import 'package:my_soft/pages/home/sticky_tabbar_delegate.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';

import 'logic.dart';

// tabbar
class BuildTabbar extends StatelessWidget {
  BuildTabbar({super.key});

  final logic = Get.put(HomeLogic());
  @override
  Widget build(BuildContext context) {
    return SliverPersistentHeader(
        // 锁定
        pinned: true,
        // 浮动
        // floating: true,
        delegate: MySliverTabBarDelegate(
          minHeight: 64,
          maxHeight: 64,
          child: TabBar(
            controller: logic.tabController,
            tabs: logic.myTabs,
          ),
        ));
  }
}
